public class Solution1217 {
    public int minCostToMoveChips(int[] position) {
        int count=0;
        for (int i : position) {
            if (i%2==0){
                count++;
            }
        }
        return Math.min(count,position.length-count);
    }

    public static void main(String[] args) {
        System.out.println(new Solution1217().minCostToMoveChips(new int[]{1,2,3}));
    }
}
